<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
<%@ page session="true"%>
<%@page import="java.util.*"%>
<%@page import="tr.com.argela.tap.mot.models.TestCase"%>
<%@page import="tr.com.argela.tap.mot.models.VersionTestCase"%>
<%@page import="tr.com.argela.tap.mot.models.User"%>

<%@page import="tr.com.argela.tap.mot.dao.TestCaseDao"%>
<%@page import="tr.com.argela.tap.mot.dao.VersionDao"%>
<%@page import="java.sql.*"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">
   <html>
<head>

<title>JSP Page</title>
<link rel="stylesheet" type="text/css" href="style/styles.css">
</head>
<body>
  
  <%
     User user = (User)request.getSession().getAttribute("userObject");
     String name = user.getName();
     
%>
  <h4 align="right"><%=name%></h4>
  <h5 align="right"><a href="logout.jsp">Log out</a></h5>
       <dıv> <h1 align="center">MOT</h1><h5 align="center">Memory Of Testing</h5></dıv>

<br><br><br><br>
          <dıv align="left">
        <table align="left">
         <tr><td>
	        <h4><a href="currentProjects.jsp">Current Projects</a></h4>
	    </td></tr>
	      <tr><td>
	      	<h4><a href="createProject.jsp">Create Project</a></h4>
	    </td></tr>
	       <tr><td>
	         <h4><a href="projectVersion.jsp">Create Project Version</a></h4>
	    </td></tr>
	       <tr><td>
	         <h4><a href="versions.jsp">Project Versions</a></h4>
	    </td></tr>
	        <tr><td>
	          <h4><a href="users.jsp">Users</a></h4>
	    </td></tr>
	        <tr><td>
	           <h4><a href="export.jsp">Export Document</a></h4>
	    </td></tr>
        </table>
        </dıv><dıv align="right">
<% 
//call db method



if(request.getParameter("id17")==null)
	response.sendRedirect("home.jsp");


TestCaseDao caseDao = new TestCaseDao();

TestCase point = caseDao.checktcase(Long.parseLong((String)request.getParameter("id17")));

%>
<table><tr>
 <th align="center"><%=point.getName()%>'s Versions</th>
<%
VersionDao verDao = new VersionDao();
List<VersionTestCase> versions = verDao.SeeVersionTestCases(Long.parseLong((String)request.getParameter("id17")));

for (VersionTestCase version : versions) {
%> 

<tr><td><a href="versioncaseproperties.jsp?id5=<%=version.getId()%>"><%=version.getName()%></a></td></tr> 
<% 
}
%>
</table>

	          
	          
</dıv>

</body>
</html>